package manage.manager;

import core.constants.Constant;
import core.redis.RedisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class QuestionCacheManage {
    @Autowired
    private RedisService redisService;

    public void addCache(Long questionId) {
        redisService.leftPushForList(Constant.QUESTION_LIST, questionId);
    }

    public void removeCache(Long questionId) {
        redisService.removeForList(Constant.QUESTION_LIST, questionId);
    }
}
